package com.ghxxzx.dagl.controller;

import com.ghxxzx.dagl.entity.Role;
import com.ghxxzx.dagl.service.impl.RoleServiceImpl;
import com.ghxxzx.dagl.vo.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * desc:
 *
 * @author cx316
 * Created by cx316 on 2020-05-26.
 */
@RestController
public class RoleController {
    @Autowired
    RoleServiceImpl roleService;

    @RequestMapping("getAllRole")
    public ResultEntity getAllRole(){
        List<Role> allRole = roleService.getAllRole();
        return ResultEntity.ok(allRole);
    }
}
